#!/usr/bin/env python
# _*_ coding:utf8 _*_ 
__date__ = '2018/6/10 17:38'
__author__ = 'zhourudong'

from django.db import models


class UsersServerAuth(models.Model):
    server_ip = models.GenericIPAddressField(protocol='IPv4', blank=True, null=True, verbose_name='服务器')
    user_name = models.CharField(max_length=20, blank=True, null=True, verbose_name='用户名')
    auth_weights = models.BooleanField(default=0, verbose_name='权限')
    datetime = models.DateTimeField(auto_now=True)

    def __str__(self):
        return self.server_ip

    class Meta:
        verbose_name = "服务器授权"
        verbose_name_plural = verbose_name
